package com.pt25.study.example.interfaces.vo;

import com.pt25.base.validator.CreateGroup;
import com.pt25.base.validator.annotation.FixedValues;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotEmpty;
import lombok.*;



@Data
@Builder
@EqualsAndHashCode
@AllArgsConstructor
@NoArgsConstructor
public class ValidTestVo {

    @NotEmpty(message = "not empty")
    private String empty;

    @Min(value = 20, message = "min 20")
    private Integer min;

    @Max(value = 100, message = "max 100")
    private Integer max;

    @FixedValues(value = {"Value1", "Value2", "Value3"},
            message = "必须是Value1, Value2, 或Value3",
            groups = CreateGroup.class)
    private String value;

}
